package cn.wolfcode.p2p.business.service;

import cn.wolfcode.p2p.business.domain.CreditTransfer;
import cn.wolfcode.p2p.business.query.BidRequestAuditQueryObject;
import cn.wolfcode.p2p.business.query.CreditTransferQueryObject;
import com.github.pagehelper.PageInfo;

public interface ICreditTransferService {

    //可转让的债权列表
    PageInfo selectForPage(CreditTransferQueryObject qo);

    //执行转让
    void creditTransfer(Long[] bidId);

    //投资列表-显示债权标
    PageInfo queryForInvestPage(CreditTransferQueryObject qo);

    //执行认购
    void subscribe(Long id);

    /**
     * 查询债权标
     *
     * @param bidId                投标的id
     * @param toLoginInfoId        转让人
     * @param transferStateBidding 债权标的状态
     * @return
     */
    CreditTransfer getByBidIdAndTransferFromIdAndState(Long bidId, Long toLoginInfoId, int transferStateBidding);

    void update(CreditTransfer creditTransfer);

    //正转让中的债权
    PageInfo queryForTransferPage(CreditTransferQueryObject qo);

    //取消债权标
    void cancelCredit(Long id);

    //我认购的债权标
    PageInfo queryForSubscribePage(CreditTransferQueryObject qo);
}
